package com.tsd.jxc.stock.vo;

import com.tsd.core.utils.HlpUtils;

import java.math.BigDecimal;
import java.util.HashMap;
import java.util.Map;

/**
 * @ClassName: JxcStockGoodsVo
 * @Description: TODO
 * @Author: Hillpool
 * @Date: 2023/3/20 10:07
 * @Version: 1.0
 */
public class JxcStockGoodsVo {

    private String sid;

    private String category_sid;

    private String category_name;

    private String goods_sid;

    private String goods_code;

    private String goods_name;

    private String goods_spec;

    private String goods_pic_file_sid;

    private String goods_unit;

    private String base_unit;

    private String goods_model;

    private BigDecimal stock_sum_qty;

    private BigDecimal avg_in_price;

    private BigDecimal avg_cost;

    private String warehouse_name;

    private BigDecimal base_buy_price;

    private BigDecimal goods_wholesale_price;

    private BigDecimal goods_retail_price;

    private BigDecimal goods_product_price;

    private String spec_preset_value;

    private String preset_product;

    private Map<String, BigDecimal> preset_qty_map;

    private String index;

    private BigDecimal init_qty;

    private BigDecimal init_amount;

    private String formula_avg_cost;

    public String getSid() {
        return sid;
    }

    public void setSid(String sid) {
        this.sid = sid;
    }

    public String getCategory_sid() {
        return category_sid;
    }

    public void setCategory_sid(String category_sid) {
        this.category_sid = category_sid;
    }

    public String getCategory_name() {
        return category_name;
    }

    public void setCategory_name(String category_name) {
        this.category_name = category_name;
    }

    public String getGoods_sid() {
        return goods_sid;
    }

    public void setGoods_sid(String goods_sid) {
        this.goods_sid = goods_sid;
    }

    public String getGoods_code() {
        return goods_code;
    }

    public void setGoods_code(String goods_code) {
        this.goods_code = goods_code;
    }

    public String getGoods_name() {
        return goods_name;
    }

    public void setGoods_name(String goods_name) {
        this.goods_name = goods_name;
    }

    public String getGoods_spec() {
        return goods_spec;
    }

    public void setGoods_spec(String goods_spec) {
        this.goods_spec = goods_spec;
    }

    public String getGoods_pic_file_sid() {
        return goods_pic_file_sid;
    }

    public void setGoods_pic_file_sid(String goods_pic_file_sid) {
        this.goods_pic_file_sid = goods_pic_file_sid;
    }

    public String getGoods_unit() {
        return goods_unit;
    }

    public void setGoods_unit(String goods_unit) {
        this.goods_unit = goods_unit;
    }

    public String getBase_unit() {
        return base_unit;
    }

    public void setBase_unit(String base_unit) {
        this.base_unit = base_unit;
    }

    public String getGoods_model() {
        return goods_model;
    }

    public void setGoods_model(String goods_model) {
        this.goods_model = goods_model;
    }

    public BigDecimal getStock_sum_qty() {
        return stock_sum_qty;
    }

    public void setStock_sum_qty(BigDecimal stock_sum_qty) {
        this.stock_sum_qty = stock_sum_qty;
    }

    public BigDecimal getAvg_in_price() {
        return avg_in_price;
    }

    public void setAvg_in_price(BigDecimal avg_in_price) {
        this.avg_in_price = avg_in_price;
    }

    public BigDecimal getAvg_cost() {
        return avg_cost;
    }

    public void setAvg_cost(BigDecimal avg_cost) {
        this.avg_cost = avg_cost;
    }

    public String getWarehouse_name() {
        return warehouse_name;
    }

    public void setWarehouse_name(String warehouse_name) {
        this.warehouse_name = warehouse_name;
    }

    public BigDecimal getBase_buy_price() {
        return base_buy_price;
    }

    public void setBase_buy_price(BigDecimal base_buy_price) {
        this.base_buy_price = base_buy_price;
    }

    public BigDecimal getGoods_wholesale_price() {
        return goods_wholesale_price;
    }

    public void setGoods_wholesale_price(BigDecimal goods_wholesale_price) {
        this.goods_wholesale_price = goods_wholesale_price;
    }

    public BigDecimal getGoods_retail_price() {
        return goods_retail_price;
    }

    public void setGoods_retail_price(BigDecimal goods_retail_price) {
        this.goods_retail_price = goods_retail_price;
    }

    public BigDecimal getGoods_product_price() {
        return goods_product_price;
    }

    public void setGoods_product_price(BigDecimal goods_product_price) {
        this.goods_product_price = goods_product_price;
    }

    public String getSpec_preset_value() {
        return spec_preset_value;
    }

    public void setSpec_preset_value(String spec_preset_value) {
        this.spec_preset_value = spec_preset_value;
    }

    public String getPreset_product() {
        return preset_product;
    }

    public void setPreset_product(String preset_product) {
        this.preset_product = preset_product;
    }

    public Map<String, BigDecimal> getPreset_qty_map() {
        return preset_qty_map;
    }

    public void setPreset_qty_map(Map<String, BigDecimal> preset_qty_map) {
        this.preset_qty_map = preset_qty_map;
    }

    public String getIndex() {
        return index;
    }

    public void setIndex(String index) {
        this.index = index;
    }

    public BigDecimal getInit_qty() {
        return init_qty;
    }

    public void setInit_qty(BigDecimal init_qty) {
        this.init_qty = init_qty;
    }

    public BigDecimal getInit_amount() {
        return init_amount;
    }

    public void setInit_amount(BigDecimal init_amount) {
        this.init_amount = init_amount;
    }

    public String getFormula_avg_cost() {
        return formula_avg_cost;
    }

    public void setFormula_avg_cost(String formula_avg_cost) {
        this.formula_avg_cost = formula_avg_cost;
    }

    public Map<String, String> getClothing_preset_product_map() {
        Map<String, String> map = new HashMap<>();
        if (!HlpUtils.isEmpty(this.getPreset_product())) {
            String[] presetProducts = this.getPreset_product().split(",");
            for (String presetProduct : presetProducts) {
                String[] strings = presetProduct.split("@");
                if (strings.length != 2) {
                    continue;
                }
                map.put(strings[0], strings[1]);
            }
        }
        return map;
    }
}
